﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="TeamDetails.aspx.cs" Inherits="App.TeamDetails" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="Panel1" runat="server">
        <h1 class="detailNick">
            <asp:Label ID="LabelTeamName" runat="server" Font-Bold="True"></asp:Label>
        </h1>
       
        <ajaxToolkit:Gravatar ID="ImageAvatar2" runat="server" DefaultImageBehavior="Identicon" CssClass="detailAvatar"/><!-- jenom pro potreby nastylovani -->
        
        <asp:LinkButton ID="ButtonStatistics" runat="server" Text="Statistiky týmu" onclick="ButtonStatistics_Click" CssClass="detailStats"></asp:LinkButton>
        <asp:Button ID="ButtonRequest" runat="server" onclick="ButtonRequest_Click" Text="Zažádat o členství" CssClass="detailButton" />
        <div class="detailInfo" style="padding-top: 18px;">
         <asp:Label ID="Label1" runat="server" Text="Místo týmu: " CssClass="left"></asp:Label>
         <asp:Label ID="LabelLocation" runat="server" CssClass="right"></asp:Label>
        </div>
        <div class="detailInfo">
         <asp:Label ID="Label2" runat="server" Text="Datum založení: " CssClass="left"></asp:Label>
         <asp:Label ID="LabelDateOfFoundtaion" runat="server" CssClass="right"></asp:Label>
        </div>
        <div class="detailInfo">
         <asp:Label ID="Label4" runat="server" Text="Zakladatel týmu: " CssClass="left"></asp:Label>
         <asp:Label ID="LabelLeader" runat="server" CssClass="right"></asp:Label>
        </div>
        <div class="detailBigInfo">
         <asp:Label ID="Label3" runat="server" Text="Popis týmu: " CssClass="left"></asp:Label>
         <asp:Label ID="LabelDescription" runat="server" CssClass="right"></asp:Label>
         <div class="clear"></div>
        </div>

        <asp:Repeater ID="RepeaterTeamLeaders" runat="server">
            <HeaderTemplate>
                <h2 class="detailHeader">Vedoucí týmu:</h2>
            </HeaderTemplate>
            <ItemTemplate>
                <div class="detailTeam">
                   <ajaxToolkit:Gravatar ID="ImageAvatar3" runat="server" DefaultImageBehavior="Identicon" Email="<%#GetMemberEmail(Container.DataItem)%>" DefaultImage="<%#GetMemberAvatar(Container.DataItem)%>" CssClass="detailTeamAvatar"/><!-- jenom pro potreby nastylovani -->
                   <asp:LinkButton ID="LinkButtonUserInfo1" runat="server" CommandArgument="<%#GetLeaderID(Container.DataItem)%>" OnClick="LinkButtonUserInfo_Click"><%#GetMemberNick(Container.DataItem)%></asp:LinkButton>
                </div>
            </ItemTemplate>
        </asp:Repeater>
            <asp:Repeater ID="RepeaterTeamMembers" runat="server">
            <HeaderTemplate>
                <h2 class="detailHeader">Členové týmu:</h2>
            </HeaderTemplate>
            <ItemTemplate>
                <div class="detailTeam">
                    <ajaxToolkit:Gravatar  ID="ImageAvatar3" runat="server" DefaultImageBehavior="Identicon" Email="<%#GetMemberEmail(Container.DataItem)%>" DefaultImage="<%#GetMemberAvatar(Container.DataItem)%>" CssClass="detailTeamAvatar"/><!-- jenom pro potreby nastylovani -->
                    <asp:LinkButton ID="LinkButtonUserInfo2" runat="server" CommandArgument="<%#GetMemberID(Container.DataItem)%>" OnClick="LinkButtonUserInfo_Click"><%#GetMemberNick(Container.DataItem)%></asp:LinkButton>
                </div>
            </ItemTemplate>
            </asp:Repeater>

        <asp:Panel ID="PanelApplications" runat="server" Visible="false">
            <asp:Repeater ID="RepeaterTeamApplicants" runat="server">
                <HeaderTemplate>
                    <h2 class="detailHeader">Uživatelé žádající o členství v týmu:</h2>
                </HeaderTemplate>
                <ItemTemplate>
                    <div class="detailTeam">
                        <ajaxToolkit:Gravatar ID="ImageAvatar3" runat="server" DefaultImageBehavior="Identicon" Email="<%#GetMemberEmail(Container.DataItem)%>" DefaultImage="<%#GetMemberAvatar(Container.DataItem)%>" CssClass="detailTeamAvatar"/><!-- jenom pro potreby nastylovani -->
                        <div class="detailRequest">
                            <span>
                                <asp:LinkButton ID="LinkButtonUserInfo3" runat="server" CommandArgument="<%#GetUserID(Container.DataItem)%>" OnClick="LinkButtonUserInfo_Click"><%#GetUserNick(Container.DataItem)%></asp:LinkButton>
                            </span>
                            <asp:LinkButton ID="LinkButtonApprove" runat="server" 
                            CommandArgument="<%#GetUserID(Container.DataItem)%>" 
                            OnClick="LinkButtonApprove_Click">přijmout</asp:LinkButton>
                            -
                            <asp:LinkButton ID="LinkButtonDisApprove" runat="server" 
                            CommandArgument="<%#GetUserID(Container.DataItem)%>" 
                            OnClick="LinkButtonDisApprove_Click">odmítnout</asp:LinkButton>
                        </div>
                    </div>
                </ItemTemplate>
            </asp:Repeater>
        </asp:Panel>
     </asp:Panel>
</asp:Content>
